//
//  UIView+HZExtension.h
//  HuiXianxia
//
//  Created by jsfu on 15/6/24.
//  Copyright (c) 2015年 何霄云. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (KNAddtions)

//设置Y坐标
@property (assign, nonatomic) CGFloat kn_t;
//得到控件坐下点的坐标
@property (assign, nonatomic) CGFloat kn_b;
//X点的坐标
@property (assign, nonatomic) CGFloat kn_l;
//得到控件右上角的坐标
@property (assign, nonatomic) CGFloat kn_r;
//设置控件宽度
@property (assign, nonatomic) CGFloat kn_w;
//设置控件高度
@property (assign, nonatomic) CGFloat kn_h;
//设置控件大小
@property (assign, nonatomic) CGSize kn_size;
//设置控件起点坐标
@property (assign, nonatomic) CGPoint kn_origin;

@property CGFloat height;

@property CGFloat width;

@property CGFloat top;

@property CGFloat left;

@property CGFloat bottom;

@property CGFloat right;

@property CGFloat centerY;

@property CGFloat centerX;

+ (UIView *)KNCreateEmptyView;

+ (UIView *)KNCreateEmptyViewWithBackGroundColor:(UIColor *)backgroundColor;

- (UIImage *)KNImageFromView;

- (UIImage *)KNGetNormalImage;

- (UINavigationController *)KNNavigationController;

- (UIViewController *)KNViewController;

- (void)KNRoundedWithNum:(int)num;

-(void)KNRemoveAllSubViews;

- (void)KNShowDebug;

- (void)KNShowDebugWithColor:(UIColor *)color;

- (UIView*)KNFindFirstResponderBeneathView:(UIView*)view;

+ (UIViewController *)KNFindViewController:(UIView *)sourceView;

- (CGFloat)KNRadioHeightWithBaseWidth:(CGFloat)width height:(CGFloat)height;

- (UITapGestureRecognizer *)KNAddTapGesTureRecognizerWithTarget:(id)target action:(SEL)selector;

- (UILongPressGestureRecognizer *)KNAddLongPressGestureRecognizerWithTarget:(id)target action:(SEL)selector;

- (UIPanGestureRecognizer *)KNAddPanGesTureRecognizerWithTarget:(id)target action:(SEL)selector;

- (UISwipeGestureRecognizer *)KNAddSwipeGesTureRecognizerWithTarget:(id)target action:(SEL)selector;


@end
